<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

require dirname(__FILE__).'/pc_controller.php';

require_once dirname(__FILE__).'/menu.php';

class Honda_card extends PC_controller {

    public function __construct(){
        parent::__construct();
        $this->load->model('Hondacustomermodel','m_customer');
    }

    public function index(){
        $data = parent::index();

        global $g_honda_card_type;
        $data['honda_card_type'] = array4js($g_honda_card_type);

        $this->load->view('admin/honda_card',$data);
    }

    public function getCardList() {
        $assist['where'] = getFilter($this->input->post(),Hondacustomermodel::$cardSearchField);
        $assist['like'] = getFilter($this->input->post(),Hondacustomermodel::$cardLikeField);
        $assist['pagination'] = getPagination($this->input->post());

        $assist['select'] = '
            honda_customer.customer_id,
            honda_customer.openid,
            honda_card.*
        ';
        list($list,$count) = $this->m_customer->getCardListSection($assist);

        // foreach ($list as $key => $value) {
        //     $list[$key]['nickname'] = urldecode($value['nickname']);
        // }

        $this->response->setSuccess();
        $this->response->setItems($list);
        $this->response->setTotalCount($count);
        $this->response->responseExit();
    }

}
/* End of file aa_game_history.php */
/* Location: ./application/controllers/aa_game_history.php */